package edu.upol.paradise.compiler.types;

import org.apache.log4j.Logger;

public class ParadiseSymbol implements ParadiseObject {
	static final Logger log = Logger.getLogger(ParadiseSymbol.class);

	public static final ParadiseSymbol T = new ParadiseSymbol("T");
	
	private String name;
	
	public ParadiseSymbol(String name) {
		this.name = name;
	}

	public boolean isTrue() {
		return true;
	}
	
	public String toString(){
		return name;
	}

	public boolean isAtom() {
		return true;
	}
	
	public boolean valueEquals(ParadiseObject other) {
		if (other instanceof ParadiseSymbol && ((ParadiseSymbol)other).name.equals(name))
			return true;
		return false;
	}
	
	public int atomHashId() {
		return name.hashCode();
	}
}
